package com.jjwxc.jwjskandriod.adapter;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.jjwxc.jwjskandriod.fragment.VipBgFragment;
import com.jjwxc.jwjskandriod.fragment.VipHeadFragment;
import com.jjwxc.jwjskandriod.fragment.VipReadFragment;

public class VipInfoAdapter extends FragmentPagerAdapter {
    public VipInfoAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int i) {
        Fragment fragment = null;
        switch (i) {
            case 0:
                fragment = new VipHeadFragment("1", "2");
                break;
            case 1:
                fragment = new VipBgFragment("4", "5");
                break;
            case 2:
                fragment = new VipReadFragment("4", "5");
                break;
        }
        assert fragment != null;
        return fragment;
    }

    @Override
    public int getCount() {
        return 3;
    }

}

